<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Delete multiple items from a specific server</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="memcached.deletemulti.html">« Memcached::deleteMulti</a></li>
      <li style="float: right;"><a href="memcached.fetch.html">Memcached::fetch »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.memcached.html">Memcached</a></li>
    <li>Delete multiple items from a specific server</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="memcached.deletemultibykey" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Memcached::deleteMultiByKey</h1>
  <p class="verinfo">(PECL memcached &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Memcached::deleteMultiByKey</span> &mdash; <span class="dc-title">Delete multiple items from a specific server</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-memcached.deletemultibykey-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Memcached::deleteMultiByKey</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$server_key</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$keys</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$time</code><span class="initializer"> = 0</span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>Memcached::deleteMultiByKey()</strong></span> is functionally equivalent to
   <span class="methodname"><a href="memcached.deletemulti.html" class="methodname">Memcached::deleteMulti()</a></span>, except that the free-form
   <code class="parameter">server_key</code> can be used to map the
   <code class="parameter">keys</code> to a specific server.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-memcached.deletemultibykey-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">server_key</code></dt>

     <dd>

      <p class="para">
       本键名用于识别储存和读取值的服务器。没有将实际的键名散列到具体的项目，而是在决定与哪一个 memcached 服务器通信时将其散列为服务器键名。这使得关联的项目在单一的服务上被组合起来以提高多重操作的效率。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">keys</code></dt>

     <dd>

      <p class="para">
       The keys to be deleted.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">time</code></dt>

     <dd>

      <p class="para">
       The amount of time the server will wait to delete the items.
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: <span class="simpara">
       As of memcached 1.3.0 (released 2009) this feature is no longer
       supported. Passing a non-zero <code class="parameter">time</code> will cause
       the deletion to fail. <span class="methodname"><a href="memcached.getresultcode.html" class="methodname">Memcached::getResultCode()</a></span>
       will return <strong><code>MEMCACHED_INVALID_ARGUMENTS</code></strong>.
      </span></p></blockquote>

     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-memcached.deletemultibykey-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an array indexed by <code class="parameter">keys</code>. Each element
   is <strong><code>true</code></strong> if the corresponding key was deleted, or one of the
   <strong><code>Memcached::RES_*</code></strong> constants if the corresponding deletion
   failed.
   </p>
  <p class="para">
   The <span class="methodname"><a href="memcached.getresultcode.html" class="methodname">Memcached::getResultCode()</a></span> will return
   the result code for the last executed delete operation, that is, the delete
   operation for the last element of <code class="parameter">keys</code>.
  </p>

 </div>


 <div class="refsect1 seealso" id="refsect1-memcached.deletemultibykey-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="methodname"><a href="memcached.delete.html" class="methodname" rel="rdfs-seeAlso">Memcached::delete()</a> - 删除一个元素</span></li>
    <li class="member"><span class="methodname"><a href="memcached.deletebykey.html" class="methodname" rel="rdfs-seeAlso">Memcached::deleteByKey()</a> - 从指定的服务器删除一个元素</span></li>
    <li class="member"><span class="methodname"><a href="memcached.deletemulti.html" class="methodname" rel="rdfs-seeAlso">Memcached::deleteMulti()</a> - Delete multiple items</span></li>
   </ul>
  </p>
 </div>


</div></div></div></body></html>